<template>
	<gui-page ref="guiPage" :customHeader="true">
		<template v-slot:gHeader>
			<nav-bar-custom left-icon="left" :title="$t('distributedEnter.scanRecord')"></nav-bar-custom>
		</template>
		<template v-slot:gBody>
			<view v-if="data.barcodeList.length==0" class="noticeHooks">
				{{data.barcodeList.length == 0 ? $t('stockManage.notAvailable') : $t('stockManage.without')}}
			</view>
			<view class="record-card" v-for="(item, index) in data.barcodeList" :key="`${item.barcode}` + `${index}`" v-else>
				<view class="card-mini-head">
					<view class="title-line"></view>
					<text>{{ $t('translationImage.serialNumber') }}：{{ data.barcodeList.length - index }}</text>
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('distributedOut.barcode') }}：</text>{{ item.barcode }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('distributedEnter.materialCode') }}：</text>{{ item.materialCode }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('distributedEnter.materialName') }}：</text>{{ item.materialName }}
				</view>
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('distributedEnter.materialSpec') }}：</text>{{ item.materialSpec
}}
				</view>
	
				<view class="custom-card-itemOne">
					<text class="item-info-title">{{ $t('distributedEnter.qty') }}：</text>{{ item.stockQty }}
				</view>
				
			</view>
		</template>
	</gui-page>
</template>

<script setup>
import { navigate } from '@/utils/routerSkip.js';
import { useStore } from "vuex";
import { basPdaOperationLogFn } from '@/utils/index.js';
import { OPERATION_DEL, OPERATION_LOOK } from '@/constant/index.js'
import {
	ref,
	reactive,
	onMounted,
	watch,
	computed,
	toRaw
} from 'vue';
let data = reactive({
	barcodeList: [],//条码数组
})
onMounted(() => {
	try {
		let inputParameter = '无'
		let returnParameter = JSON.stringify(data.barcodeList)
		let operationPicture = '成品盘点'
		let callInterface = '无'
		let opertionParmes = {
			inputParameter,
			returnParameter,
			operationPicture,
			callInterface,
			responseCode: '无',//返回状态
			errorMessage: '无',//错误信息
			isPass: 'Y',//是否成功 Y N
			operationType: OPERATION_LOOK
		}
		basPdaOperationLogFn(opertionParmes)
	} catch (error) {
	}
})
let store = useStore();
data.barcodeList = computed(() => {
	return store.state.finishedProductPanDian
})
</script>

<style></style>
